<template>
  <transition class="fade" >
    <div class="payment-success">
      <div class="success-icon">
        <i class="el-icon-success"></i>
      </div>
      <div class="success-text">
        <p>支付成功！</p>
        <p>支付金额为{{ PayAmount }}元</p>
<!--        <el-button type="primary" @click="CallReception">支付完成</el-button>-->
      </div>
    </div>
  </transition>
</template>

<script>
  export default {
    name: "paySuccess",
    props: {
      PayAmount: 0,
    },
    created() {
      setTimeout(() => {
        this.CallReception();
      }, 2000)
    },
    methods: {
      CallReception() {
        // 触发自定义事件，并传递数值
        this.$emit('return-value',null);
      }
    }
  }
</script>

<style>
  .payment-success {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
    flex-direction: column;
  }

  .success-icon {
    font-size: 80px;
    color: #67c23a; /* 成功图标的颜色 */
    margin-bottom: 20px;
  }

  .success-text {
    text-align: center;
    font-size: 24px;
  }

  /* 添加过渡动画 */
  .fade-enter-active, .fade-leave-active {
    transition: all 0.5s;
  }
  .fade-enter, .fade-leave-to {
    opacity: 0;
    transform: translateY(-20px);
  }
</style>

